home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1999 March
/
EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso
/
earcd
/
devel
/
vbcc-wos-src
/
machines
/
amigawos
/
libsrc
/
stdio
/
ftell.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-01
|
238b
|
12 lines
#include <stdio.h>
#include <errno.h>
long ftell(FILE *f)
{
long offset;
offset=_seek(f->filehandle,0,SEEK_CUR);
if(f->flags&_READ) offset-=f->count;
if(f->flags&_WRITE) offset+=f->bufsize-f->count;
return(offset);
}